<template>
  <PageBox :data="dataInfo" @searchBtn="getTbody">
    <template #search="{ search }">
      <ElFormItemBox label="协议书号" :prop="`likeWords`">
        <ElInputBox :data="search" dataName="likeWords" />
      </ElFormItemBox>
      <ElFormItemBox label="客户名称" :prop="`customerCode`">
        <ElSelectBox :data="search" dataName="customerCode" :options="options.client" />
      </ElFormItemBox>
      <ElFormItemBox label="产品名称" :prop="`productCode`">
        <ElSelectBox :data="search" dataName="productCode" :options="options.product" />
      </ElFormItemBox>
      <ElFormItemBox label="出库日期">
        <ElDaysBox :data="search" :dataName="['beginTime', 'endTime']" />
      </ElFormItemBox>
    </template>
  </PageBox>
</template>

<script setup lang="ts">
const { proxy } = getCurrentInstance() as any;
import './pageCss.scss'; // 引入样式
import { useListComponent } from './pageTs'; // 引入逻辑
const { dataInfo, getTbody } = useListComponent();
import { getClient, getProduct } from '@/utils/optionsArr.ts';
const options = reactive({
  client: [],
  product: [],
})
onMounted(() => {
  getClient(options, 'client') //获取所有客户
  getProduct(options, 'product') //获取所有产品
});
</script>
